<template>
  <div class="tab_warp">
    <div
      class="tab_item"
      v-for="(item, index) in tabList"
      :key="index"
      :class="{ active: index === active }"
    >
      {{ item.name }}
    </div>
  </div>
</template>
<script>
export default {
  props: {
    active: {
      type: Number,
      default: 0
    },
    tabList: {
      type: Array,
      default: () => {
        return {};
      }
    }
  },
  data() {
    return {};
  }
};
</script>
<style lang="scss" scoped>
.tab_warp {
  width: 100%;
  height: 35px;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  div {
    width: 25%;
    text-align: center;
    height: 100%;
    line-height: 35px;
    font-size: 11px;
    font-family: Alibaba PuHuiTi;
    font-weight: 400;
    color: rgba(85, 85, 85, 1);
  }
  .active {
    background: rgba(254, 231, 231, 1);
    color: #ff0e52;
  }
}
</style>
